package com.zhang.service.Circular_dependency;


import com.myspring.anno.MyAutowired;
import com.myspring.anno.MyComponent;

@MyComponent
public class ClassA {

    @MyAutowired
    private ClassB classB;

    public ClassA() {
//        System.out.println("ClassA 实例化========[构造执行]: " + this);
    }


    public ClassB getClassB() {
        return classB;
    }

    public void setClassB(ClassB b) {
        this.classB = b;
//        System.out.println("A 中的 b 属性: " + b.getClass() + " (哈希码: " + b.hashCode() + ")");

    }

    public void test() {
        System.out.println("ClassA's test method");
    }

}
